<include file="Public/min-header"/>
<style>
.picture {
    line-height: 0;
    background-color: #FFF;
    text-align: center;
    vertical-align: middle;
    display: table-cell;
    width: 160px;
    height: 100px;
    margin: 0 auto;
    border: solid 1px #F5F5F5;
    overflow: hidden;
}
.picture img {
    max-width: 160px;
    max-height: 100px;
    margin-top: expression(100-this.height/2);
}
</style>
<div class="wrapper">
    <include file="Public/breadcrumb"/>
    <section class="content" style="padding:0px 15px;">
        <!-- Main content -->
        <div class="container-fluid">
            <div class="pull-right">
                <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
                <a onclick="get_help(this)" data-url="http://www.vyxjj.com?/Doc/Indexbbc/article/id/1064/developer/user.html" class="btn btn-default" href="javascript:;"><i class="fa fa-question-circle"></i> 帮助</a>                
            </div>
            <div class="panel panel-default">           
                <div class="panel-body ">   
                    <include file="store_setting_navtabs"/>
                    <!--表单数据-->
                    <form method="post" id="handlepost">                    
                    <!--通用信息-->
                    <div class="tab-content" style="padding:20px 0px;">                 	  
                        <div class="tab-pane active" id="tab_tongyong"> 
                          	<div class="callout callout-inro">
								<p>1. 可以在此处对手机店铺进行设置，修改后的设置需要点击“保存修改”按钮进行保存</p>
						        <p>2. 可以拖拽“轮播”图片以调整顺序，无图片的不予轮播显示</p>
						        <p>3. 跳转URL必须带有“http://”，商品ID必须为数字且为本店发布的商品，非法数据将被自动过滤掉</p>
						        <p>4. 默认手机店铺页面显示的最多20条推荐商品，可以在“出售中的商品”中进行设置</p>
				            </div>
                        </div> 
                        <p class="text-warning">轮播： 手机店铺页面头部区域下方的轮播图片展示，最多可上传5张图片，推荐图片大小640x240</p> 
					  	<div class="row" style="margin:20px auto;text-align:center;max-width:800px;">
						  	<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
			                    <ol class="carousel-indicators">
			                    <foreach name="store_slide" item="vo" key="k">
			                     <if condition="$vo neq ''">
			                      	<li data-target="#carousel-example-generic" data-slide-to="{$k}" class=" <if condition='$k eq 0'>active</if>"></li>
			                     </if>
			                    </foreach>
			                    </ol>
			                    <div class="carousel-inner">
			                    <foreach name="store_slide" item="vo" key="k">
			                      <if condition="$vo neq ''">
			                      <div class="item <if condition='$k eq 0'>active</if>">
			                        <img height="250" src="{$vo}" alt="First slide">
			                        <div class="carousel-caption">
			                        </div>
			                      </div>
			                      </if>
			                    </foreach>
			                    </div>
			                    <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
			                      <span class="fa fa-angle-left"></span>
			                    </a>
			                    <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
			                      <span class="fa fa-angle-right"></span>
			                    </a>
		                  	</div>
	                  	</div> 
	                 	 
	                 <div class="row col-md-12">
	                 	<for start="0" end="5">
		                <div class="col-sm-4 col-md-2">
		                  <div class="thumbnail">
		                    <div class="picture"><img  id="srcpath_{$i}"  <empty name="store_slide[$i]">src="__PUBLIC__/images/not_adv.jpg"<else />src="{$store_slide[$i]}"</empty>>
		                    <input type="hidden" id="imgpath_{$i}" name="store_slide[]" value="{$store_slide[$i]}">
		                    </div>
		                    <div class="caption">
		                    <p>跳转URL...<br/><input type="text" name="store_slide_url[]" class="form-control" value="<empty name="store_slide_url[$i]">http://<else />{$store_slide_url[$i]}</empty>"></p>
		                    <p><input type="button" class="btn btn-default" onClick="upload_img('{$i}')"  value="上传图片"/></p>
		                    </div>
		                  </div>
		                </div>
		                </for>
		              </div> 
		             <div class="row" style="text-align:center;"><a href="javascript:void(0)" onclick="adsubmit()" class="btn btn-info margin">提交设置</a></div>         
                    </div>              
			    	</form><!--表单数据-->
                </div>
            </div>
        </div>
    </section>
</div>

<script>
function adsubmit(){
	$('#handlepost').submit();
}

function goset(obj){
	window.location.href = $(obj).attr('data-url');
}

var turn = 0;
function upload_img(i){
	turn = i;
	GetUploadify(1,'store_logo','seller','callback');
}

function callback(img_str){
	$('#imgpath_'+turn).val(img_str);
	$('#srcpath_'+turn).attr('src',img_str);
}
</script>
</body>
</html>